package cn.wen.yinxiu.member.server.protocol.login;

import cn.wen.yinxiu.member.server.protocol.Command;
import cn.wen.yinxiu.member.server.protocol.Packet;
import cn.wen.yinxiu.member.vo.ChatTalkDto;
import cn.wen.yinxiu.member.vo.GroupInfo;
import cn.wen.yinxiu.member.vo.UserFriendInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: LoginResponse
 * @Author: 小飞
 * @Date: 2023/5/28 14:41
 * @Description: 登录响应请求
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginResponse extends Packet {

    /**
     * 登陆反馈
     */
    private boolean success;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 用户头像
     */
    private String userAvatar;
    /**
     * 用户昵称
     */
    private String userNickName;
    /**
     * 聊天对话框数据[success is true]
     */
    private List<ChatTalkDto> chatTalkList = new ArrayList<>();
    /**
     * 群组列表
     */
    private List<GroupInfo> groupsList = new ArrayList<>();
    /**
     * 好友列表
     */
    private List<UserFriendInfo> userFriendList = new ArrayList<>();

    public LoginResponse(boolean success){
        this.success = success;
    }
    @Override
    public Byte getCommand() {
        return Command.LoginResponse;
    }

}




